package object.obj2D.weapon;

import object.obj2D.graphics.AnimSystem;
import object.obj2D.graphics.Square;


public class MachineGun extends Gun {
	
	private boolean m_isFire = false;
	public MachineGun(){
		this.m_animName = "/res/raw/gun.bin";
		this.m_animFire = new AnimSystem(m_animName, ANIM_MACHINE_FIRE, 0);
		this.m_background = new Square(m_bgWidght, m_bgHeight);
		
	}
	public void Render(int action){
		switch(action){
		case AC_FIRE:
			m_animFire.Play();
			break;
		case AC_STOP:
			m_animFire.Stop();
			m_animFire.setPlayFrame(m_animFire.getBeginFrame());
			break;
		}
		m_animFire.Render();
		m_background.Render();
	}
	
	public void SetFire(boolean isFire)
	{
		m_isFire = isFire;
	}
	
	public boolean IsFire()
	{
		return m_isFire;
	}
}
